import 'package:flutter/material.dart';

///
/// Column  API : https://api.flutter-io.cn/flutter/widgets/Column-class.html
///
class DemoColumn extends StatelessWidget {
  const DemoColumn({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Column 布局',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('垂直方向布局')
        ),
        body: const MyColumn01(),
      ),
    );
  }
}


class MyColumn01 extends StatelessWidget {
  const MyColumn01({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.center,
      mainAxisAlignment: MainAxisAlignment.center,
      children: const [
        Text('Welcome', style: TextStyle(fontSize: 40.0)),
        Text('Hello', style: TextStyle(fontSize: 40.0)),
        Text('中华人民共和国', style: TextStyle(fontSize: 30.0)),
      ],
    );
  }
}



